package org.wu.framework.authorization.platform.domain.model.sys.user;

import org.wu.framework.authorization.platform.domain.model.sys.permission.SysPermission;
import org.wu.framework.authorization.platform.domain.model.sys.zone.SysZone;
import org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyDomainRepository;
import org.wu.framework.lazy.orm.database.lambda.domain.LazyPage;
import org.wu.framework.web.response.Result;

import java.util.List;

/**
 * describe
 *
 * @author Jia wei Wu
 * @date 2023/05/17 11:19 晚上
 * @see DefaultDDDLazyDomainRepository
 **/

public interface SysUserRepository {


    /**
     * describe 新增
     *
     * @param
     * @return
     * @exception/throws
     * @author Jia wei Wu
     * @date 2023/05/17 11:19 晚上
     **/

    Result<SysUser> story(SysUser sysUser);

    /**
     * describe 查询单个
     *
     * @param
     * @return
     * @exception/throws
     * @author Jia wei Wu
     * @date 2023/05/17 11:19 晚上
     **/

    Result<SysUser> findOne(SysUser sysUser);

    /**
     * describe 查询多个
     *
     * @param
     * @return
     * @exception/throws
     * @author Jia wei Wu
     * @date 2023/05/17 11:19 晚上
     **/

    Result<List<SysUser>> findList(SysUser sysUser);

    /**
     * describe 分页查询多个
     *
     * @param
     * @return
     * @exception/throws
     * @author Jia wei Wu
     * @date 2023/05/21 11:16 晚上
     **/

    Result<LazyPage<SysUser>> findPage(int size, int current, SysUser sysUser);
    /**
     * describe 删除
     *
     * @param
     * @return
     * @exception/throws
     * @author Jia wei Wu
     * @date 2023/05/17 11:19 晚上
     **/

    Result<SysUser> delete(SysUser sysUser);
    /**
     * 获取用户区域
     *
     * @param userId 用户ID
     * @return
     */
    Result<List<SysZone>> findUseZoneList(Long userId);

    /**
     * 获取用户权限
     *
     * @param userId 用户ID
     * @return
     */
    Result<List<SysPermission>> findUserPermissionList(Long userId);
}